package cn.wolfcode.luowowo.repository;

import cn.wolfcode.luowowo.domain.Strategy;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 旅游攻略
 */
@Repository
public interface StrategyRepository extends MongoRepository<Strategy,String> {


    /**
     * 目的地下分类概况/明细
     * @param id
     * @return
     */
    List<Strategy> findByCatalogId(String id);

    /**
     * 目的地下点击量前3的攻略
     * @param destId
     * @param pageable
     * @return
     */
    List<Strategy> findByDestId(String destId, Pageable pageable);

    List<Strategy> findByDestName(String name);
}
